package com.soup.lab.validation.model;

import com.soup.lab.validation.anno.Odd;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Positive;

@Data
public class SimpleModel {
    @NotEmpty
    private String name;
    @Positive(message = "{Positive.age}")
    @Odd(message = "{Odd.age}")
    private Integer age;
    @Odd(message = "{Odd.size}")
    private Long size;
    @NotEmpty(message = "{NotEmpty.mark}", groups = Special.class)
    private String mark;

    public interface Special {}

}
